local skel = fk.CreateSkill {
  name = "lb__jiaqian",
}

Fk:loadTranslationTable {
  ["lb__jiaqian"] = "加钱",
  --[":lb__jiaqian"] = "每轮限一次，当你造成或受到伤害后，你可以令一名角色摸两张牌。",
  --9.23
  [":lb__jiaqian"] = "每回合限一次，当你造成或受到伤害后，你可以令一名角色摸两张牌。",

  ["#lb__jiaqian"] = "加钱：你可以令一名角色摸两张牌",

  ["@[player]lb__jiaqian"] = "加钱",

  ["$lb__jiaqian1"] = "顾客就是上帝~",
  ["$lb__jiaqian2"] = "想要我背叛上帝，除非…你加钱~",
}

local jiaqian_spec = {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and not player.dead and
    player:usedSkillTimes(skel.name, Player.HistoryTurn) == 0
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    local tos = room:askToChoosePlayers(player, {
      targets = room:getAlivePlayers(),
      min_num = 1,
      max_num = 1,
      prompt = "#lb__jiaqian",
      skill_name = skel.name,
    })
    event:setCostData(self, { tos = tos })
    return #tos > 0
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local p = event:getCostData(self).tos[1]
    room:addTableMark(player, "@[player]lb__jiaqian", p.id)
    p:drawCards(2, skel.name)
  end,
}

skel:addEffect(fk.Damage, jiaqian_spec)
skel:addEffect(fk.Damaged, jiaqian_spec)

return skel
